#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    hwnd=(int)ui->frame->winId();
    //menuBar()->hide();
    //statusBar()->hide();
       
     //hwnd=(int)w.winId();
     w=new MplayerWindow(this);
    MplayerLayer *wp;
   wp=w->videoLayer();
    hwnd=(int)wp->winId();


    //QPalette p1 = w.palette();
     //p1.setColor(w.backgroundRole(), 0x202020);
   // w.setPalette(p1);
     w->setColorKey(0x202020);

}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::changeEvent(QEvent *e)
{
    QMainWindow::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        ui->retranslateUi(this);
        break;
    default:
        break;
    }
}



